import http from "./http";

export const getTest = (params, options) => http.get('yan/api.php?charset=utf-8&encode=json', params, options)

export const postTest = (params, options) => http.post('yan/api.php?charset=utf-8&encode=json', params, options)

export const getNoEmpty = (params) => {
    return new Promise((resolve, reject) => {
        http.get('/api/claim/getNoEmpty', params).then(r => resolve(r)).catch(e => reject(e))
    })
}

export const getLand = (params) => http.get('/api/land/list/page', params)

export const reserveLand=(params)=>http.post('/api/claim/reserve',params)

export const addTrusteeship=(params)=>http.post('/api/trusteeship/addTrusteeship',params)

export const getScienceList=(params)=>http.post('/api/article/list/page',params)

export const getArticle=(params)=>http.get('/api/article/get',params)

export const wechatLogin = (params) => http.get(`/api/wechat/login`,params)

export const updateUserInfo = (params) => http.put('/api/user/updateUserInfo',params)

export const checkReserve = (params) => http.get('/api/claim/reserve/list',params)

export const checkHost = (params) => http.get('/api/trusteeship',params)

export const delHost = (params) => http.delete(`/api/trusteeship/${params.id}`)

export const getUserInfo=(params)=>http.get(`/api/user/${params.id}`)


export const BroadcastMapList = (params) => http.post('/api/picture/getList',params)

export const wechatCode = (params) => http.get('/api/group-qr-code',params)


